home *** CD-ROM | disk | FTP | other *** search
/ Go Ronald / Go Ronald Voice Interactive CD.iso / Data1.cab / _8D088414393A4AB0BB2239714C0C0C0B / scripts / frame_26 / DoAction.as
Text File  |  2005-08-05  |  2KB  |  66 lines

  1. stop();
  2. GoStraight._visible = true;
  3. var length_arr = new Array(0,6,4,12,4,4,12,6,8);
  4. var Direction_Arr = new Array("A","Right","Left","Right","Left","Right","Left","Right","Right");
  5. var ArrayLength = 0;
  6. var ArrayFileName;
  7. var ArrayDirection;
  8. var hasClicked;
  9. userScore = 0;
  10. TurnRightSign._visible = false;
  11. TurnLeftSign._visible = false;
  12. turnLeft_mc._visible = false;
  13. turnRight_mc._visible = false;
  14. activityLevel_pb._visible = false;
  15. GoStraight._visible = true;
  16. x++;
  17. Timer._visible = true;
  18. if(x < length_arr.length)
  19. {
  20.    ArrayFileName = "SWFs/Curve" + x + ".swf";
  21.    ArrayLength = length_arr[x];
  22.    ArrayDirection = Direction_Arr[x];
  23. }
  24. else if(x = length_arr.length)
  25. {
  26.    ArrayLength = 10;
  27.    ArrayFileName = "SWFs/finish_approach.swf";
  28.    ArrayDirection = "noTurn";
  29.    gotoAndStop("Turn");
  30.    play();
  31. }
  32. turnRight_mc.onRollOver = function()
  33. {
  34.    turnSound.stop();
  35.    turnSound.start();
  36. };
  37. turnRight_mc.onRelease = function()
  38. {
  39.    userScore = GoStraight.turnScore;
  40.    this.gotoAndPlay("init");
  41.    this.rightGreenBeep_snd.setVolume(0);
  42.    this.rightGreenBeep_snd.stop();
  43.    delete this.rightGreenBeep_snd;
  44.    this._visible = false;
  45.    hasClicked = true;
  46.    GoStraight.killitall();
  47.    mApplication.trace("hasclicked righjtbtn : " + hasClicked);
  48. };
  49. turnLeft_mc.onRollOver = function()
  50. {
  51.    turnSound.stop();
  52.    turnSound.start();
  53. };
  54. turnLeft_mc.onRelease = function()
  55. {
  56.    userScore = GoStraight.turnScore;
  57.    this.gotoAndPlay("init");
  58.    this.leftGreenBeep_snd.setVolume(0);
  59.    this.leftGreenBeep_snd.stop();
  60.    delete this.leftGreenBeep_snd;
  61.    this._visible = false;
  62.    hasClicked = true;
  63.    mApplication.trace("hasclicked righjtbtn : " + hasClicked);
  64.    GoStraight.killitall();
  65. };
  66.